# Maintainer: Muflone http://www.muflone.com/contacts/english/

pkgname=dbeaver-plugin-batik
pkgver=1.14.0
pkgrel=3
pkgdesc='DBeaver library for SVG format'
arch=('any')
url='https://dbeaver.io/'
license=('Apache')
makedepends=('unzip')
depends=('dbeaver>=4.2.5')
source=("https://dbeaver.io/update/ce/latest/plugins/org.jkiss.bundle.apache.batik_${pkgver}.jar"
        "${pkgname}.info")
sha256sums=('b62ee068b2f06c729615c351cfa9c761b22ded91708f3fbdc41666997b8b931f'
            '57b90e4a153c5d5407f799acb7d1f3bd863444db05f86cb9927c48d1048c7ad2')
noextract=("org.jkiss.bundle.apache.batik_${pkgver}.jar")

package() {
  # Install plugin
  install -m 755 -d "${pkgdir}/usr/lib/dbeaver/plugins"
  install -m 644 -t "${pkgdir}/usr/lib/dbeaver/plugins" \
    "org.jkiss.bundle.apache.batik_${pkgver}.jar"

  # Add configuration file (handled by the hook)
  install -m 755 -d "${pkgdir}/etc/dbeaver/bundles.d"
  install -m 644 "${srcdir}/${pkgname}.info" "${pkgdir}/etc/dbeaver/bundles.d/20-${pkgname}.info"
}
